Optimal. Leaf size=116 \[ \frac {15 \sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{8 a^{7/2} f}-\frac {15 \cos (e+f x)}{8 a^3 f}+\frac {\cos ^5(e+f x)}{4 a f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {5 \cos ^3(e+f x)}{8 a^2 f \left (b+a \cos ^2(e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4218, 294, 327,
211} \begin {gather*} \frac {15 \sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{8 a^{7/2} f}-\frac {15 \cos (e+f x)}{8 a^3 f}+\frac {5 \cos ^3(e+f x)}{8 a^2 f \left (a \cos ^2(e+f x)+b\right )}+\frac {\cos ^5(e+f x)}{4 a f \left (a \cos ^2(e+f x)+b\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 294
Rule 327
Rule 4218
Rubi steps
\begin {align*} \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac {\text {Subst}\left (\int \frac {x^6}{\left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac {\cos ^5(e+f x)}{4 a f \left (b+a \cos ^2(e+f x)\right )^2}-\frac {5 \text {Subst}\left (\int \frac {x^4}{\left (b+a x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{4 a f}\\ &=\frac {\cos ^5(e+f x)}{4 a f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {5 \cos ^3(e+f x)}{8 a^2 f \left (b+a \cos ^2(e+f x)\right )}-\frac {15 \text {Subst}\left (\int \frac {x^2}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{8 a^2 f}\\ &=-\frac {15 \cos (e+f x)}{8 a^3 f}+\frac {\cos ^5(e+f x)}{4 a f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {5 \cos ^3(e+f x)}{8 a^2 f \left (b+a \cos ^2(e+f x)\right )}+\frac {(15 b) \text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{8 a^3 f}\\ &=\frac {15 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{8 a^{7/2} f}-\frac {15 \cos (e+f x)}{8 a^3 f}+\frac {\cos ^5(e+f x)}{4 a f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {5 \cos ^3(e+f x)}{8 a^2 f \left (b+a \cos ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 7.67, size = 656, normalized size = 5.66 \begin {gather*} \frac {(a+2 b+a \cos (2 (e+f x)))^3 \sec ^6(e+f x) \left (15 \left (a^3+64 b^3\right ) \text {ArcTan}\left (\frac {\left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+15 \left (a^3+64 b^3\right ) \text {ArcTan}\left (\frac {\left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+\frac {\sqrt {a} \left (24 a^4 \sqrt {b} \cos (e+f x)-24 a^3 b^{3/2} \cos (e+f x)-144 a^2 b^{5/2} \cos (e+f x)+512 b^{9/2} \cos (e+f x)-72 a^3 b^{3/2} \cos (e+f x) \cos (2 (e+f x))-24 a^3 \sqrt {b} \cos (e+f x) (a+2 b+a \cos (2 (e+f x)))+72 a^2 b^{3/2} \cos (e+f x) (a+2 b+a \cos (2 (e+f x)))-1152 b^{7/2} \cos (e+f x) (a+2 b+a \cos (2 (e+f x)))-15 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right ) (a+2 b+a \cos (2 (e+f x)))^2-15 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a}+\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right ) (a+2 b+a \cos (2 (e+f x)))^2-512 b^{5/2} \cos (e) \cos (f x) (a+2 b+a \cos (2 (e+f x)))^2+512 b^{5/2} (a+2 b+a \cos (2 (e+f x)))^2 \sin (e) \sin (f x)+6 a^4 \sqrt {b} \csc (e+f x) \sin (4 (e+f x))\right )}{(a+2 b+a \cos (2 (e+f x)))^2}\right )}{4096 a^{7/2} b^{5/2} f \left (a+b \sec ^2(e+f x)\right )^3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 83, normalized size = 0.72
method | result | size |
derivativedivides | \(\frac {-\frac {b \left (\frac {\frac {7 b \left (\sec ^{3}\left (f x +e \right )\right )}{8}+\frac {9 a \sec \left (f x +e \right )}{8}}{\left (a +b \left (\sec ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {15 \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}-\frac {1}{a^{3} \sec \left (f x +e \right )}}{f}\) | \(83\) |
default | \(\frac {-\frac {b \left (\frac {\frac {7 b \left (\sec ^{3}\left (f x +e \right )\right )}{8}+\frac {9 a \sec \left (f x +e \right )}{8}}{\left (a +b \left (\sec ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {15 \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{3}}-\frac {1}{a^{3} \sec \left (f x +e \right )}}{f}\) | \(83\) |
risch | \(-\frac {{\mathrm e}^{i \left (f x +e \right )}}{2 a^{3} f}-\frac {{\mathrm e}^{-i \left (f x +e \right )}}{2 a^{3} f}-\frac {b \left (9 a \,{\mathrm e}^{7 i \left (f x +e \right )}+27 a \,{\mathrm e}^{5 i \left (f x +e \right )}+28 b \,{\mathrm e}^{5 i \left (f x +e \right )}+27 a \,{\mathrm e}^{3 i \left (f x +e \right )}+28 b \,{\mathrm e}^{3 i \left (f x +e \right )}+9 a \,{\mathrm e}^{i \left (f x +e \right )}\right )}{4 a^{3} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2} f}-\frac {15 i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{16 a^{4} f}+\frac {15 i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{16 a^{4} f}\) | \(249\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 109, normalized size = 0.94 \begin {gather*} -\frac {\frac {9 \, a b \cos \left (f x + e\right )^{3} + 7 \, b^{2} \cos \left (f x + e\right )}{a^{5} \cos \left (f x + e\right )^{4} + 2 \, a^{4} b \cos \left (f x + e\right )^{2} + a^{3} b^{2}} - \frac {15 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{3}} + \frac {8 \, \cos \left (f x + e\right )}{a^{3}}}{8 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.36, size = 317, normalized size = 2.73 \begin {gather*} \left [-\frac {16 \, a^{2} \cos \left (f x + e\right )^{5} + 50 \, a b \cos \left (f x + e\right )^{3} + 30 \, b^{2} \cos \left (f x + e\right ) - 15 \, {\left (a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right )}{16 \, {\left (a^{5} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b f \cos \left (f x + e\right )^{2} + a^{3} b^{2} f\right )}}, -\frac {8 \, a^{2} \cos \left (f x + e\right )^{5} + 25 \, a b \cos \left (f x + e\right )^{3} + 15 \, b^{2} \cos \left (f x + e\right ) - 15 \, {\left (a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right )}{8 \, {\left (a^{5} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b f \cos \left (f x + e\right )^{2} + a^{3} b^{2} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 92, normalized size = 0.79 \begin {gather*} \frac {15 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a^{3} f} - \frac {\cos \left (f x + e\right )}{a^{3} f} - \frac {\frac {9 \, a b \cos \left (f x + e\right )^{3}}{f} + \frac {7 \, b^{2} \cos \left (f x + e\right )}{f}}{8 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )}^{2} a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 105, normalized size = 0.91 \begin {gather*} \frac {15\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\cos \left (e+f\,x\right )}{\sqrt {b}}\right )}{8\,a^{7/2}\,f}-\frac {\frac {7\,b^2\,\cos \left (e+f\,x\right )}{8}+\frac {9\,a\,b\,{\cos \left (e+f\,x\right )}^3}{8}}{f\,\left (a^5\,{\cos \left (e+f\,x\right )}^4+2\,a^4\,b\,{\cos \left (e+f\,x\right )}^2+a^3\,b^2\right )}-\frac {\cos \left (e+f\,x\right )}{a^3\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________